package cn.tedu.sp07.feign;


import cn.tedu.sp01.pojo.User;
import cn.tedu.sp01.web.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


@FeignClient(name = "user-service",fallback = UserFeignClientFB.class)
public interface UserFeignClient {
    @GetMapping("/{userId}")
    JsonResult<User> getUser(@PathVariable("userId") String userId);

    @GetMapping("/{userId}/score")
    JsonResult addScore(@PathVariable("userId") Integer userId, @RequestParam("score") Integer score);
}
